package com.redsun.smallworld.gl.controls.parent;

import javax.media.opengl.GL2;

/**
 * Created by zhebinwang on 2017/6/2.
 */
public abstract class SuperControl {
    protected float texu,texv; //控件纹理坐标起点
    protected float texwidth,texheight; //控件纹理坐标宽高
    protected int x,y;//空间坐标
    protected int width,height; //控件宽高
    protected int texindex; //控件纹理坐标索引
    protected String controlType ; //控件类型；
    protected String controlName; //空间名称；

    public abstract  int doRender(GL2 gl2);



    public int getTexindex() {
        return texindex;
    }

    public SuperControl setTexindex(int texindex) {
        this.texindex = texindex;
        return this;
    }

    public String getControlType() {
        return controlType;
    }

    public SuperControl setControlType(String controlType) {
        this.controlType = controlType;
        return this;
    }

    public String getControlName() {
        return controlName;
    }

    public SuperControl setControlName(String controlName) {
        this.controlName = controlName;
        return this;
    }

    public float getTexu() {
        return texu;
    }

    public SuperControl setTexu(float texu) {
        this.texu = texu;
        return this;
    }

    public float getTexv() {
        return texv;
    }

    public SuperControl setTexv(float texv) {
        this.texv = texv;
        return this;
    }

    public float getTexwidth() {
        return texwidth;
    }

    public SuperControl setTexwidth(float texwidth) {
        this.texwidth = texwidth;
        return this;
    }

    public float getTexheight() {
        return texheight;
    }

    public SuperControl setTexheight(float texheight) {
        this.texheight = texheight;
        return this;
    }

    public int getX() {
        return x;
    }

    public SuperControl setX(int x) {
        this.x = x;
        return this;
    }

    public int getY() {
        return y;
    }

    public SuperControl setY(int y) {
        this.y = y;
        return this;
    }

    public int getWidth() {
        return width;
    }

    public SuperControl setWidth(int width) {
        this.width = width;
        return this;
    }

    public int getHeight() {
        return height;
    }

    public SuperControl setHeight(int height) {
        this.height = height;
        return this;
    }
}
